import React, { Component } from 'react'

const data = [
  {id: '001', content: "你好，中国"},
  {id: '002', content: "你好， 中国上海"},
  {id: '003', content: "你好，中国上海松江区车墩镇"},
]

export default class Detail extends Component {
  render() {
    const {id, title} = this.props.match.params
    const findResult = data.find((dt) => {
      return dt.id === id
    })
    return (
      <ul>
        <li>
          <div>ID:{findResult.id}</div>
        </li>
        <li>
          <div>TITLE:{title}</div>
        </li>
        <li>
          <div>CONTENT:{findResult.content}</div>
        </li>
      </ul>
    )
  }
}
